<template>
  <Select @on-change="handleChange" :value="cur">
    <Option v-for="item in list" :value="item._links.self.href" :key="item.id">{{ item.name }}</Option>
  </Select>
</template>

<script>
export default {
  props: {
    module: {
      type: String,
      required: true
    },
    cur: String,
    handleChange: {}
  },
  computed: {
    list () {
      return this.$store.state[this.module].allList
    }
  },
  created () {
    this.$store.dispatch(`${this.module}/getAllList`)
  }
}
</script>

<style>
</style>
